#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <cmath>

using namespace std;

// 计算单个烧杯的期望产出
double get_expectation(double alpha, double beta, double product) {
    if (beta == 0) return 0;
    return (beta / (alpha + beta)) * product;
}

// 找到最优分配方案
double solve(vector<int> &p, vector<int> &l, int total_beta) {
    int n = p.size();
    vector<pair<double, int>> ratio(n);

    // 计算每个烧杯的性价比
    for (int i = 0; i < n; i++) {
        ratio[i] = {(double) p[i] / l[i], i};
    }

    // 按性价比降序排序
    sort(ratio.rbegin(), ratio.rend());

    vector<double> beta(n, 0);
    int remaining_beta = total_beta;
    double result = 0;

    // 按性价比分配beta
    for (int i = 0; i < n && remaining_beta > 0; i++) {
        int idx = ratio[i].second;
        // beta不能超过alpha
        int max_beta = min(remaining_beta, l[idx]);
        beta[idx] = max_beta;
        remaining_beta -= max_beta;

        result += get_expectation(l[idx], beta[idx], p[idx]);
    }

    return result;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, t, q;
    cin >> n >> t >> q;

    vector<int> p(n), l(n);
    for (int i = 0; i < n; i++) cin >> p[i];
    for (int i = 0; i < n; i++) cin >> l[i];

    // 处理每次变动
    for (int i = 0; i < q; i++) {
        int type, idx;
        cin >> type >> idx;
        idx--; // 转换为0-based索引

        // 更新alpha的量
        if (type == 1) {
            l[idx]++;
        } else {
            l[idx]--;
        }

        // 计算并输出结果
        double ans = solve(p, l, t);
        cout << fixed << setprecision(9) << ans << endl;
    }

    return 0;
}